package com.aaaa.bbbb.dao;

import com.aaaa.bbbb.domain.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;

/**
 * Created by Administrator on 2020/7/20.
 */

@Mapper
public interface UsersDao {


    @Select("select id,name,password from users where name=#{name} and password=#{password}")
    Users getUsersByNameAndPassword(Users users);


    @Insert("INSERT INTO `miaosha`.`users` (`id`, `name`, `password`) VALUES (#{id},#{name},#{password});")
    void add(Users users);

}
